﻿<Window x:Class="WorkItemVisualization.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Work Item Visualization" Height="687" Width="860" Icon="/WorkItemVisualization;component/Images/16x16Progression.ico" xmlns:my="clr-namespace:Wpf.Controls;assembly=Wpf.SplitButton">
    <Grid ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition Height="106" />
            <RowDefinition Height="401*" />
            <RowDefinition Height="65" />
        </Grid.RowDefinitions>
        <DockPanel Grid.Row="1" Name="dockPanel1">
            <Grid Margin="10,0,10, 0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="100*" />
                    <RowDefinition Height="5" />
                    <RowDefinition Height="59*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200" />
                    <ColumnDefinition Width="5" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <GridSplitter Grid.Column="1" ShowsPreview="True" ResizeDirection="Columns" VerticalContentAlignment="Stretch" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Grid.RowSpan="4" />
                <GridSplitter Height="9" HorizontalAlignment="Stretch" Name="gridSplitter1" VerticalAlignment="Stretch" ResizeDirection="Rows" ShowsPreview="True" HorizontalContentAlignment="Stretch" Grid.Row="1" VerticalContentAlignment="Stretch" />
                <DockPanel Grid.Row="2" Margin="1,0,0,0" Name="dockPanel2">
                    <Label BorderThickness="1" DockPanel.Dock="Top" Content="Select Link Types:" Height="28" Name="label4" />
                    <ListBox Name="lstLinkTypes" DockPanel.Dock="Top" OverridesDefaultStyle="False">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Name="LinkTypeList">
                                    <Grid.RowDefinitions>
                                        <RowDefinition></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition></ColumnDefinition>
                                        <ColumnDefinition></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <CheckBox Grid.Column="0" IsChecked="{Binding Path=Selected}" IsEnabled="{Binding Path=Enabled}" VerticalAlignment="Center" Checked="chkLinkTypes_Changed" Unchecked="chkLinkTypes_Changed"></CheckBox>
                                    <Label Grid.Column="1" Content="{Binding Path=LinkType}"></Label>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </DockPanel>
                <ListView Grid.Column="2" Name="lstResults" Margin="0,0,-1,35" Grid.RowSpan="3" MouseDoubleClick="lstResults_MouseDoubleClick">
                    <ListView.View>
                        <GridView />
                    </ListView.View>
                </ListView>
                <TreeView Margin="-4,0,1,0" Name="tvwQueries" MouseDoubleClick="tvwQueries_MouseDoubleClick"></TreeView>
                <Button Content="Edit Query" Grid.Column="2" Grid.Row="2" Height="23" HorizontalAlignment="Right" Margin="0,146,0,0" Name="btnEditQuery" VerticalAlignment="Top" Width="75" IsEnabled="False" Click="btnEditQuery_Click" />
            </Grid>
        </DockPanel>
        <ComboBox Height="23" Margin="184,10,285,0" Name="cboServer" VerticalAlignment="Top" IsEnabled="False" />
        <Label Content="Connect to Project Collection:" Height="28" HorizontalAlignment="Left" Margin="11,9,0,0" Name="label1" VerticalAlignment="Top" Width="167" />
        <Button Content="Connect" Height="23" HorizontalAlignment="Right" Margin="0,9,199,0" Name="btnConnect" VerticalAlignment="Top" Width="75" Click="btnConnect_Click" />
        <Button Content="Add" Height="23" HorizontalAlignment="Right" Margin="0,9,105,0" Name="btnAdd" VerticalAlignment="Top" Width="75" Click="btnAdd_Click" />
        <ComboBox Height="23" IsEnabled="False" Margin="184,39,285,0" Name="cboProjects" VerticalAlignment="Top" />
        <Label Content="Select Project:" Height="28" HorizontalAlignment="Left" Margin="11,39,0,0" Name="label2" VerticalAlignment="Top" Width="159" />
        <Button Content="Select" Height="23" HorizontalAlignment="Right" Margin="0,38,199,0" Name="btnSelectProject" VerticalAlignment="Top" Width="75" Click="btnSelectProject_Click" />
        <Label Content="Location of output file:" Height="28" HorizontalAlignment="Left" Margin="11,67,0,0" Name="label3" VerticalAlignment="Top" Width="159" />
        <Button Content="Browse" Height="23" HorizontalAlignment="Right" Margin="0,67,199,0" Name="btnBrowse" VerticalAlignment="Top" Width="75" Click="btnBrowse_Click" />
        <TextBox Height="23" Margin="184,68,285,0" Name="txtOutput" VerticalAlignment="Top">C:\Users\tfssetup\Documents\Output.dgml</TextBox>
        <CheckBox Content="Perform Dependency Analysis" Height="16" HorizontalAlignment="Left" Margin="151,10,0,0" Name="chkDependencyAnalysis" VerticalAlignment="Top" Grid.Row="2" Checked="chkDependencyAnalysis_Checked" Unchecked="chkDependencyAnalysis_Unchecked" />
        <CheckBox Content="Perform Full Analysis" IsChecked="False" Height="16" HorizontalAlignment="Left" Margin="10,10,0,0" Name="chkFull" VerticalAlignment="Top" Grid.Row="2" Checked="chkFull_Changed" Unchecked="chkFull_Changed" />
        <Label Content="Release: 2.0" Height="28" HorizontalAlignment="Right" Margin="0,39,12,0" Name="label5" VerticalAlignment="Top" />
        <CheckBox Content="Hide Intervening Links" Visibility="Hidden" Height="16" HorizontalAlignment="Left" Margin="334,10,0,0" Name="chkHideInterveningLinks" VerticalAlignment="Top" Grid.Row="2" />
        <my:SplitButton Content="State" Grid.Row="2" Height="24" HorizontalAlignment="Right" Margin="0,0,12,33" Name="splitBtnState" VerticalAlignment="Bottom" Width="75" Click="btnState_Click">
            <MenuItem Header="Group by">
                <MenuItem Header="Area" CommandParameter="System.AreaPath" Click="btnState_Click" />
                <MenuItem Header="Iteration" CommandParameter="System.IterationPath" Click="btnState_Click" />
                <MenuItem Header="Assigned To"  CommandParameter="System.AssignedTo" Click="btnState_Click" />
                <MenuItem Header="Changed By"  CommandParameter="System.ChangedBy" Click="btnWorkItems_Click" />
            </MenuItem>
        </my:SplitButton>
        <my:SplitButton Content="Work Items" Grid.Row="2" Height="24" HorizontalAlignment="Right" Margin="0,0,105,33" Name="splitBtnWorkItem" VerticalAlignment="Bottom" Width="97" Click="btnWorkItems_Click">
            <MenuItem Header="Visualize" Click="btnWorkItems_Click"/>
            <MenuItem Header="Group by">
                <MenuItem Header="State" CommandParameter="System.State" Click="btnWorkItems_Click" />
                <MenuItem Header="Area" CommandParameter="System.AreaPath" Click="btnWorkItems_Click" />
                <MenuItem Header="Iteration" CommandParameter="System.IterationPath" Click="btnWorkItems_Click" />
                <MenuItem Header="Assigned To"  CommandParameter="System.AssignedTo" Click="btnWorkItems_Click" />
            </MenuItem>
        </my:SplitButton>
        <Button Content="Options" Height="23" HorizontalAlignment="Right" Margin="0,9,12,0" Name="btnOptions" VerticalAlignment="Top" Width="75" Click="btnOptions_Click" />
        <StatusBar Grid.Row="2" Height="23" HorizontalAlignment="Stretch" Margin="0,42,0,0" Name="statusBar" VerticalAlignment="Top">
            <StatusBarItem />
        </StatusBar>
    </Grid>
</Window>
